A common task in the manipulation of digital images is the removal of one or more objects from a scene. Simple examples of this include: the removal of one or more background objects, leaving just a foreground object(s); the removal of a foreground object from a background scene; and, for composited images produced from multiple layers of image data, the removal of an object belonging to an original layer from the overall composite. The removal process is typically a difficult task for several reasons. A pixel at an edge of an object may have contributions from both the foreground and the background. The color of the pixel is consequently a blend of the two regions, making the removal of only one of the regions difficult. Even for an object that does not include blend data at the object edge (e.g., hard edges), the object border often contains detail that requires tedious effort to define manually, making the removal of the object difficult. Objects that include hair or fur present a combination of these problems. These types of objects have complex shapes and typically include regions with thin fibers that result in color blending.
In general, the problem does not have a simple unambiguous solution. The movie industry has adopted a solution that includes simplifying the scene, filming objects or people against a simple background (e.g., a blue screen) having a uniform color. However, even with simplified scenes, the removal of the background from complex objects remains a difficult process.
Techniques have been developed to produce approximate solutions. A software mask can be applied to an object to clip the object from the background. However, a haloing effect at the edge of the object will often result. The haloing effect can be minimized by manually tracing an object outline and closely cropping the mask to the outline, but the solution is tedious for complex objects, such as objects with hair. Alternatively, the mask can be sized to clip a portion of the foreground image away to remove pixels that include blend data. Neither of these solutions is satisfactory.
Another solution is to erase the undesirable portions of the image. There are various techniques for processing a raster image to erase components of the image. A common technique is to use a brush that is sized as one or more pixels in one or more dimensions. By positioning the brush over the image, the pixels that are covered by the brush are erased by one of two conventional erasing techniques. In a first technique, the erased colors are replaced with a background color. In a second technique, colors are effectively erased by driving their alpha values toward zero (where a full erasure occurs if the alpha channel value is set to zero).
Both of these techniques are effective for removing an undesirable portion of an image. However, the techniques also require tedious manual manipulations when operating on complex objects. In addition, conventional erasure techniques will not produce the correct original colors for pixels at object edges that include blend data. In the first technique, pixels that are part of an object edge and include blend data can either be erased completely (substituting a background color) or left un-erased. In either case, the results are similar to the haloing or close cropping problems described above. In the second technique, the color for blend pixels is unaffected, again resulting in undesirable results.
Transparency is a visual blending effect obtained when a background object (image, text, lines or filled regions) is partially obscured by a foreground object that is drawn over the background object. Numerous other blending effects may be used to integrate foreground and background graphics data. Examples of blending effects include a drop shadow effect, a screen effect, darker and lighter effects and overprinting effects.
A common task in the manipulation of digital images is the removal of a background object from a transparent foreground object. The transparent nature of the foreground object results in a combination of the foreground object blending with one or more background objects in the scene. In this example, the entire foreground object is a blend. It is difficult to erase one without erasing parts of the other. Typically, a conventional erasure algorithm is provided for erasing the background feature where alpha values that reflect the portion of the foreground element are extracted. However, even if the alpha values that reflect the amount of the foreground element that was present-in the initial image are extracted, the color values remain a blend of the foreground and background features.